home *** CD-ROM | disk | FTP | other *** search
/ Visual Cafe 3 / Visual Cafe 3.ISO / Vcafe / Main.bin / LineBorderBeanInfo.java < prev    next >
Text File  |  1998-10-21  |  2KB  |  62 lines

  1. package com.symantec.itools.swing.borders;
  2.  
  3. import java.beans.*;
  4. import com.symantec.itools.vcafe.beans.PropertyDescriptorAttributes;
  5. import com.symantec.itools.vcafe.beans.PropertyHelpIDs;
  6.  
  7. public final class LineBorderBeanInfo
  8.     extends BorderBeanInfo
  9. {
  10.     public LineBorderBeanInfo()
  11.     {
  12.         super();
  13.         
  14.         set16x16ColorIconName("LineBorder.gif");
  15.     }
  16.     
  17.     protected Class getBeanClass()
  18.     {
  19.         return LineBorder.class;
  20.     }
  21.     
  22.     public PropertyDescriptor[] getPropertyDescriptors()
  23.     {
  24.         try
  25.         {
  26.             Class beanClass = getBeanClass();
  27.             
  28.             PropertyDescriptor thickness = new PropertyDescriptor("thickness", beanClass);
  29.             thickness.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.LINEBORDER_THICKNESS_HELP_ID));
  30.             
  31.             PropertyDescriptor lineColor = new PropertyDescriptor("lineColor", beanClass);
  32.             lineColor.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.LINEBORDER_LINE_COLOR_HELP_ID));
  33.             
  34.             PropertyDescriptor roundedCorners = new PropertyDescriptor("roundedCorners", beanClass);
  35.             roundedCorners.setValue(PropertyDescriptorAttributes.WIN_HELP_ATTRIBUTE, new Integer(PropertyHelpIDs.LINEBORDER_ROUNDED_CORNERS_HELP_ID));
  36.             
  37.             PropertyDescriptor[] rv = {
  38.                     thickness,
  39.                     lineColor,
  40.                     roundedCorners };
  41.                     
  42.             return rv;
  43.         }
  44.         catch(IntrospectionException e)
  45.         {
  46.             e.printStackTrace();
  47.         }
  48.         
  49.         //Error, return no properties
  50.         return new PropertyDescriptor[0];
  51.     }
  52.  
  53.     protected void modifyBeanDescriptor(BeanDescriptor beanDescriptor)
  54.     {
  55.         super.modifyBeanDescriptor(beanDescriptor);
  56.         
  57.         beanDescriptor.setValue("WINHELP", winHelpID);
  58.     }
  59.     
  60.     protected final static String winHelpID = "0x60139";
  61. }
  62.